package string;

public class Test_StringReverse {
    /*
    需求：
        反转字符串
     */

    public static void main(String[] args) {
        String str = "123456";

        char[] arr = str.toCharArray();
        String s = "";
        for (int i = str.length() - 1; i >= 0; i--) {
            s = s+arr[i];
        }
        System.out.println(s);
    }

}
